package com.llt.pojo;



import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@ApiModel(value = "管理员信息类",description = "密码登录才需要用")
@TableName(value = "userinfo")
public class UserInfo implements Serializable {
    @TableId(type = IdType.AUTO)
    private int id;
    @NotBlank(message = "用户名不能为空")
    @ApiModelProperty("用户名")
    private String username;
    @NotBlank(message = "密码不能为空")
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    @ApiModelProperty(value = "密码",hidden = false)
    private String password;

    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)//序列化不返回前端
    @ApiModelProperty(hidden = true)//api文档不显示
    @TableLogic
    private  int is_delete = 0;
    @ApiModelProperty(hidden = true)
    @Version
    private int version;
    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }


    public String getUsername() {
        return username;
    }
    public void setUsername(String username) {
        this.username = username;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public int getIs_delete() {
        return is_delete;
    }
    public void setIs_delete(int is_delete) {
        this.is_delete = is_delete;
    }
    @Override
    public String toString() {
        return "UserInfo{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", is_delete=" + is_delete +
                '}';
    }
}
